<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:composition template="Template.xhtml">
        <ui:define name="top">
            #{bundle.VRP}#{bundle.detail} 

        </ui:define>
        <ui:define name="content">
            <f:metadata>
                <f:viewParam name="idproblem" value="#{problemViewMB.idproblem}"/> 

            </f:metadata>
            <f:event listener="#{problemViewMB.init()}"
                     type="preRenderView"></f:event>
            <!--<p:outputPanel deferred="true" >-->
            <!--<shiro:hasPermission name="user:V">--> 
            <h:form id="form">


                <p:panel>
                    <div class="left"><h3>#{bundle.basic}#{bundle.info}</h3></div> 
                    <p:panelGrid styleClass="noborder left" columns="5"   >
                        <h:outputText value="#{bundle.id}" />
                        <h:outputText value="#{problemViewMB.currentProblem.idproblem}" />
                        <div style="width: 130px"/>
                        <h:outputText value="#{bundle.depot}" />
                        <h:outputText value="#{problemViewMB.currentProblem.iddepot.name}" />
                        <h:outputText value="创建#{bundle.date}" />
                        <h:outputText value="#{problemViewMB.currentProblem.createdate}">
                            <f:convertDateTime pattern="YYYY/MM/dd" />
                        </h:outputText>
                        <br />
                        <h:outputText value="执行#{bundle.date}" />
                        <h:outputText value="#{problemViewMB.currentProblem.fordate}">
                            <f:convertDateTime pattern="YYYY/MM/dd" />
                        </h:outputText>
                        <h:outputText value="#{bundle.depotready}" />
                        <h:outputText value="#{problemViewMB.currentProblem.readyTime}">
                            <f:convertDateTime pattern="HH:mm:ss" />
                        </h:outputText>
                        <br />
                        <h:outputText value="#{bundle.depotdue}" />
                        <h:outputText value="#{problemViewMB.currentProblem.dueDate}">
                            <f:convertDateTime pattern="HH:mm:ss" />
                        </h:outputText>
                        <h:outputText value="#{bundle.executing}" />
                        <h:outputText value="#{problemViewMB.status}" converter="#{operationStateConvert}">    
                        </h:outputText>
                        <h:outputText value="(规划方案id:#{problemViewMB.currentProblem.idsolution.idsolution})" rendered="#{problemViewMB.currentProblem.idsolution!=null}" /> 
                        <br />
                        <p:button value="#{bundle.executing}#{bundle.record}" rendered="#{problemViewMB.status==2}" onclick="window.parent.addTab('#{bundle.executing}#{bundle.record}', 'operationrecord/view.xhtml');" >

                        </p:button> 
<!--                        <p:button value="#{bundle.back}" outcome="/admin/problem/list.xhtml" >

                        </p:button>  -->


                    </p:panelGrid>
                    <p:separator />
                    <p:accordionPanel multiple="true" class="left">
                        <p:tab title="#{bundle.solution}#{bundle.info}">
                            <!--<div class="left"><h3>#{bundle.solution}#{bundle.info}</h3></div>--> 
                            <ui:include src="solutionform.xhtml"/>
                            <p:separator />
                        </p:tab>
                        <p:tab title="#{bundle.order}#{bundle.info}">
                            <!--<div class="left"><h3>#{bundle.order}#{bundle.info}</h3></div>--> 
                            <ui:include src="customerdemandform.xhtml"/>
                            <p:separator />

                        </p:tab>

                        <p:tab title="#{bundle.duty}#{bundle.vehicle}#{bundle.info}">
                        <!--<div class="left"><h3>#{bundle.duty}#{bundle.info}</h3></div>--> 
                            <ui:include src="attendanceform.xhtml"/>
                            <p:separator />
                        </p:tab>
                    </p:accordionPanel>

                </p:panel>

            </h:form>
            <!--</p:outputPanel>-->
            <!--</shiro:hasPermission>-->
        </ui:define>
    </ui:composition>
</html>

